package com.qww;


public class Exec09 {

    public static void main(String[] args) {
        int n = args.length > 0 ? Integer.parseInt(args[0]) : 5;
        findFib(n);
    }

    public static void findFib(int n) {
        switch (n) {
            case 1 : System.out.println(1); break;
            case 2 : System.out.println("1、1"); break;
            default:
                StringBuilder builder = new StringBuilder("1、1、");
                for (int i = 3; i <= n; i++) {
                    int fib = fib(i);
                    builder.append(fib);
                    builder.append("、");
                }
                System.out.println(builder.deleteCharAt(builder.length() - 1));
        }
    }

    private static int fib(int n) {
        if (n <= 1) return 1;
        return fib(n-1) + fib(n-2);
    }
}
